3.1.52 \(\int \frac {\sec ^5(c+d x)}{(a+a \sec (c+d x))^2} \, dx\) [52]

Optimal. Leaf size=123 \[ \frac {7 \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac {16 \tan (c+d x)}{3 a^2 d}+\frac {7 \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac {8 \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {\sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2} \]

[Out]

7/2*arctanh(sin(d*x+c))/a^2/d-16/3*tan(d*x+c)/a^2/d+7/2*sec(d*x+c)*tan(d*x+c)/a^2/d-8/3*sec(d*x+c)^2*tan(d*x+c
)/a^2/d/(1+sec(d*x+c))-1/3*sec(d*x+c)^3*tan(d*x+c)/d/(a+a*sec(d*x+c))^2

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3901, 4104, 3872, 3852, 8, 3853, 3855} \begin {gather*} -\frac {16 \tan (c+d x)}{3 a^2 d}+\frac {7 \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac {8 \tan (c+d x) \sec ^2(c+d x)}{3 a^2 d (\sec (c+d x)+1)}+\frac {7 \tan (c+d x) \sec (c+d x)}{2 a^2 d}-\frac {\tan (c+d x) \sec ^3(c+d x)}{3 d (a \sec (c+d x)+a)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^5/(a + a*Sec[c + d*x])^2,x]

[Out]

(7*ArcTanh[Sin[c + d*x]])/(2*a^2*d) - (16*Tan[c + d*x])/(3*a^2*d) + (7*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) -
(8*Sec[c + d*x]^2*Tan[c + d*x])/(3*a^2*d*(1 + Sec[c + d*x])) - (Sec[c + d*x]^3*Tan[c + d*x])/(3*d*(a + a*Sec[c
 + d*x])^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3901

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-d^2)
*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 2)/(f*(2*m + 1))), x] + Dist[d^2/(a*b*(2*m + 1)),
Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 2)*(b*(n - 2) + a*(m - n + 2)*Csc[e + f*x]), x], x] /;
FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[n, 2] && (IntegersQ[2*m, 2*n] || IntegerQ[
m])

Rule 4104

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[d*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(
a*f*(2*m + 1))), x] - Dist[1/(a*b*(2*m + 1)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 1)*Simp[A
*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b,
d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\sec ^5(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=-\frac {\sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\int \frac {\sec ^3(c+d x) (3 a-5 a \sec (c+d x))}{a+a \sec (c+d x)} \, dx}{3 a^2}\\ &=-\frac {8 \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {\sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {\int \sec ^2(c+d x) \left (16 a^2-21 a^2 \sec (c+d x)\right ) \, dx}{3 a^4}\\ &=-\frac {8 \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {\sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {16 \int \sec ^2(c+d x) \, dx}{3 a^2}+\frac {7 \int \sec ^3(c+d x) \, dx}{a^2}\\ &=\frac {7 \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac {8 \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {\sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac {7 \int \sec (c+d x) \, dx}{2 a^2}+\frac {16 \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 a^2 d}\\ &=\frac {7 \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac {16 \tan (c+d x)}{3 a^2 d}+\frac {7 \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac {8 \sec ^2(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac {\sec ^3(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(300\) vs. \(2(123)=246\).
time = 2.00, size = 300, normalized size = 2.44 \begin {gather*} \frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) \left (-2 \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )-40 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+3 \cos ^3\left (\frac {1}{2} (c+d x)\right ) \left (-14 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+14 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {1}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {1}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {8 \sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )-2 \cos \left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {c}{2}\right )\right )}{3 a^2 d (1+\sec (c+d x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^5/(a + a*Sec[c + d*x])^2,x]

[Out]

(Cos[(c + d*x)/2]*Sec[c + d*x]^2*(-2*Sec[c/2]*Sin[(d*x)/2] - 40*Cos[(c + d*x)/2]^2*Sec[c/2]*Sin[(d*x)/2] + 3*C
os[(c + d*x)/2]^3*(-14*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 14*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]
+ (Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^(-2) - (Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^(-2) - (8*Sin[d*x])/((Cos
[c/2] - Sin[c/2])*(Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x
)/2]))) - 2*Cos[(c + d*x)/2]*Tan[c/2]))/(3*a^2*d*(1 + Sec[c + d*x])^2)

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 120, normalized size = 0.98

method result size
derivativedivides \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {5}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d \,a^{2}}\) \(120\)
default \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {5}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {5}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d \,a^{2}}\) \(120\)
risch \(-\frac {i \left (21 \,{\mathrm e}^{6 i \left (d x +c \right )}+63 \,{\mathrm e}^{5 i \left (d x +c \right )}+98 \,{\mathrm e}^{4 i \left (d x +c \right )}+126 \,{\mathrm e}^{3 i \left (d x +c \right )}+97 \,{\mathrm e}^{2 i \left (d x +c \right )}+75 \,{\mathrm e}^{i \left (d x +c \right )}+32\right )}{3 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 a^{2} d}-\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 a^{2} d}\) \(147\)
norman \(\frac {-\frac {13 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {149 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {100 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}+\frac {18 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {17 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )}{6 a d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4} a}-\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{2} d}+\frac {7 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{2} d}\) \(174\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5/(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/2/d/a^2*(-1/3*tan(1/2*d*x+1/2*c)^3-7*tan(1/2*d*x+1/2*c)+1/(tan(1/2*d*x+1/2*c)-1)^2+5/(tan(1/2*d*x+1/2*c)-1)-
7*ln(tan(1/2*d*x+1/2*c)-1)-1/(tan(1/2*d*x+1/2*c)+1)^2+5/(tan(1/2*d*x+1/2*c)+1)+7*ln(tan(1/2*d*x+1/2*c)+1))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 190, normalized size = 1.54 \begin {gather*} -\frac {\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} - \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a+a*sec(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/6*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) - 5*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a^2 - 2*a^2*sin(d*x + c)^
2/(cos(d*x + c) + 1)^2 + a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) + sin(
d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 21*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 21*log(sin(d*x + c)/(
cos(d*x + c) + 1) - 1)/a^2)/d

________________________________________________________________________________________

Fricas [A]
time = 3.75, size = 162, normalized size = 1.32 \begin {gather*} \frac {21 \, {\left (\cos \left (d x + c\right )^{4} + 2 \, \cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 21 \, {\left (\cos \left (d x + c\right )^{4} + 2 \, \cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (32 \, \cos \left (d x + c\right )^{3} + 43 \, \cos \left (d x + c\right )^{2} + 6 \, \cos \left (d x + c\right ) - 3\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a+a*sec(d*x+c))^2,x, algorithm="fricas")

[Out]

1/12*(21*(cos(d*x + c)^4 + 2*cos(d*x + c)^3 + cos(d*x + c)^2)*log(sin(d*x + c) + 1) - 21*(cos(d*x + c)^4 + 2*c
os(d*x + c)^3 + cos(d*x + c)^2)*log(-sin(d*x + c) + 1) - 2*(32*cos(d*x + c)^3 + 43*cos(d*x + c)^2 + 6*cos(d*x
+ c) - 3)*sin(d*x + c))/(a^2*d*cos(d*x + c)^4 + 2*a^2*d*cos(d*x + c)^3 + a^2*d*cos(d*x + c)^2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{5}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5/(a+a*sec(d*x+c))**2,x)

[Out]

Integral(sec(c + d*x)**5/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x)/a**2

________________________________________________________________________________________

Giac [A]
time = 0.51, size = 122, normalized size = 0.99 \begin {gather*} \frac {\frac {21 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {21 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {6 \, {\left (5 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2} a^{2}} - \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a+a*sec(d*x+c))^2,x, algorithm="giac")

[Out]

1/6*(21*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 21*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 + 6*(5*tan(1/2*d*x
+ 1/2*c)^3 - 3*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^2*a^2) - (a^4*tan(1/2*d*x + 1/2*c)^3 + 21*a
^4*tan(1/2*d*x + 1/2*c))/a^6)/d

________________________________________________________________________________________

Mupad [B]
time = 0.74, size = 122, normalized size = 0.99 \begin {gather*} \frac {7\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6\,a^2\,d}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}-\frac {7\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^5*(a + a/cos(c + d*x))^2),x)

[Out]

(7*atanh(tan(c/2 + (d*x)/2)))/(a^2*d) - tan(c/2 + (d*x)/2)^3/(6*a^2*d) - (3*tan(c/2 + (d*x)/2) - 5*tan(c/2 + (
d*x)/2)^3)/(d*(a^2*tan(c/2 + (d*x)/2)^4 - 2*a^2*tan(c/2 + (d*x)/2)^2 + a^2)) - (7*tan(c/2 + (d*x)/2))/(2*a^2*d
)

________________________________________________________________________________________